<template>
  <div class="page">
    <div class="card">
      <div class="card_con balance">
        <div class="b_title"><span>当前余额</span></div>
        <div class="b_number">¥{{money}}</div>
        <a class="detaillink" href="/pages/accountdetail/main">明细</a>
      </div>
      <a class="card_btn" @click="pay">充值</a>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      current: 0,
      money:0
    }
  },
  onLoad(options){
    this.money=options.money;

  },
  mounted(){
    wx.setNavigationBarTitle({
      title: "金额"
    })
  },
  methods: {
    pay(){
      let url="/pages/recharge/main";
       mpvue.navigateTo({ url })
    },
    bindViewTap () {
      const url = '../logs/main'
      if (mpvuePlatform === 'wx') {
        mpvue.switchTab({ url })
      } else {
        mpvue.navigateTo({ url })
      }
    }
  },

  created () {
    // let app = getApp()
  }
}
</script>

<style scoped>
.card{
  margin: 0.8em;
  border-radius: 0.3em;
  background: #fff;
  box-shadow: 0px 0px 0.6em #ddd;
}
.card .card_con{
  padding: 0.6em;
}
.card .card_btn{
  border-top: 1px #e5e5e5 solid;
  height: 2.4em;
  line-height: 2.4em;
  text-align: center;
  color: #FF787E;
}
.balance{
  position: relative;
  text-align: center;
}
.balance .b_title span{
  background:url(../../../static/images/ic_zhye.png) left center no-repeat;
  background-size: auto 1.4em;
  padding:0.4em 0px 0.4em 1.6em;
  font-size: 0.8em;
  color: #999;
}
.balance .detaillink{
  position: absolute;
  right: 0.4em;
  top: 0.4em;
  padding: 0.4em;
  color: #FF787E;
  font-size: 0.8em;
}
.balance .b_number{
  font-size: 1.6em;
  color: #000;
  padding: 0.3em 0;
  font-weight: bold;
}
</style>
